import { alphabets, symbols } from './symbols';

const URL_PREFIX =
  'https://huggingface.co/software-mansion/react-native-executorch';
const VERSION_TAG = 'resolve/v0.5.0';

const DETECTOR_CRAFT_1280_MODEL = `${URL_PREFIX}-detector-craft/${VERSION_TAG}/xnnpack_quantized/xnnpack_craft_1280_quantized.pte`;
const DETECTOR_CRAFT_800_MODEL = `${URL_PREFIX}-detector-craft/${VERSION_TAG}/xnnpack_quantized/xnnpack_craft_800_quantized.pte`;
const DETECTOR_CRAFT_320_MODEL = `${URL_PREFIX}-detector-craft/${VERSION_TAG}/xnnpack_quantized/xnnpack_craft_320_quantized.pte`;

type RecognizerSize = 64 | 128 | 256 | 512;

const createHFRecognizerDownloadUrl = (
  alphabet: keyof typeof alphabets,
  size: RecognizerSize
) =>
  `${URL_PREFIX}-recognizer-crnn.en/${VERSION_TAG}/xnnpack/${alphabet}/xnnpack_crnn_${alphabet}_${size}.pte`;

const RECOGNIZER_ENGLISH_CRNN_512 = createHFRecognizerDownloadUrl(
  'english',
  512
);
const RECOGNIZER_ENGLISH_CRNN_256 = createHFRecognizerDownloadUrl(
  'english',
  256
);
const RECOGNIZER_ENGLISH_CRNN_128 = createHFRecognizerDownloadUrl(
  'english',
  128
);
const RECOGNIZER_ENGLISH_CRNN_64 = createHFRecognizerDownloadUrl('english', 64);

const RECOGNIZER_LATIN_CRNN_512 = createHFRecognizerDownloadUrl('latin', 512);
const RECOGNIZER_LATIN_CRNN_256 = createHFRecognizerDownloadUrl('latin', 256);
const RECOGNIZER_LATIN_CRNN_128 = createHFRecognizerDownloadUrl('latin', 128);
const RECOGNIZER_LATIN_CRNN_64 = createHFRecognizerDownloadUrl('latin', 64);

const RECOGNIZER_JAPANESE_CRNN_512 = createHFRecognizerDownloadUrl(
  'japanese',
  512
);
const RECOGNIZER_JAPANESE_CRNN_256 = createHFRecognizerDownloadUrl(
  'japanese',
  256
);
const RECOGNIZER_JAPANESE_CRNN_128 = createHFRecognizerDownloadUrl(
  'japanese',
  128
);
const RECOGNIZER_JAPANESE_CRNN_64 = createHFRecognizerDownloadUrl(
  'japanese',
  64
);

const RECOGNIZER_KANNADA_CRNN_512 = createHFRecognizerDownloadUrl(
  'kannada',
  512
);
const RECOGNIZER_KANNADA_CRNN_256 = createHFRecognizerDownloadUrl(
  'kannada',
  256
);
const RECOGNIZER_KANNADA_CRNN_128 = createHFRecognizerDownloadUrl(
  'kannada',
  128
);
const RECOGNIZER_KANNADA_CRNN_64 = createHFRecognizerDownloadUrl('kannada', 64);

const RECOGNIZER_KOREAN_CRNN_512 = createHFRecognizerDownloadUrl('korean', 512);
const RECOGNIZER_KOREAN_CRNN_256 = createHFRecognizerDownloadUrl('korean', 256);
const RECOGNIZER_KOREAN_CRNN_128 = createHFRecognizerDownloadUrl('korean', 128);
const RECOGNIZER_KOREAN_CRNN_64 = createHFRecognizerDownloadUrl('korean', 64);

const RECOGNIZER_TELUGU_CRNN_512 = createHFRecognizerDownloadUrl('telugu', 512);
const RECOGNIZER_TELUGU_CRNN_256 = createHFRecognizerDownloadUrl('telugu', 256);
const RECOGNIZER_TELUGU_CRNN_128 = createHFRecognizerDownloadUrl('telugu', 128);
const RECOGNIZER_TELUGU_CRNN_64 = createHFRecognizerDownloadUrl('telugu', 64);

const RECOGNIZER_ZH_SIM_CRNN_512 = createHFRecognizerDownloadUrl('zh_sim', 512);
const RECOGNIZER_ZH_SIM_CRNN_256 = createHFRecognizerDownloadUrl('zh_sim', 256);
const RECOGNIZER_ZH_SIM_CRNN_128 = createHFRecognizerDownloadUrl('zh_sim', 128);
const RECOGNIZER_ZH_SIM_CRNN_64 = createHFRecognizerDownloadUrl('zh_sim', 64);

const RECOGNIZER_CYRILLIC_CRNN_512 = createHFRecognizerDownloadUrl(
  'cyrillic',
  512
);
const RECOGNIZER_CYRILLIC_CRNN_256 = createHFRecognizerDownloadUrl(
  'cyrillic',
  256
);
const RECOGNIZER_CYRILLIC_CRNN_128 = createHFRecognizerDownloadUrl(
  'cyrillic',
  128
);
const RECOGNIZER_CYRILLIC_CRNN_64 = createHFRecognizerDownloadUrl(
  'cyrillic',
  64
);

const createOCRObject = (
  recognizerLarge: string,
  recognizerMedium: string,
  recognizerSmall: string,
  language: keyof typeof symbols
) => {
  return {
    detectorSource: DETECTOR_CRAFT_800_MODEL,
    recognizerLarge,
    recognizerMedium,
    recognizerSmall,
    language,
  };
};

const createVerticalOCRObject = (
  recognizerLarge: string,
  recognizerSmall: string,
  language: keyof typeof symbols
) => {
  return {
    detectorLarge: DETECTOR_CRAFT_1280_MODEL,
    detectorNarrow: DETECTOR_CRAFT_320_MODEL,
    recognizerLarge,
    recognizerSmall,
    language,
  };
};

export const OCR_ABAZA = createOCRObject(
  RECOGNIZER_CYRILLIC_CRNN_512,
  RECOGNIZER_CYRILLIC_CRNN_256,
  RECOGNIZER_CYRILLIC_CRNN_128,
  'abq'
);
export const VERTICAL_OCR_ABAZA = createVerticalOCRObject(
  RECOGNIZER_CYRILLIC_CRNN_512,
  RECOGNIZER_CYRILLIC_CRNN_64,
  'abq'
);

export const OCR_ADYGHE = createOCRObject(
  RECOGNIZER_CYRILLIC_CRNN_512,
  RECOGNIZER_CYRILLIC_CRNN_256,
  RECOGNIZER_CYRILLIC_CRNN_128,
  'ady'
);
export const VERTICAL_OCR_ADYGHE = createVerticalOCRObject(
  RECOGNIZER_CYRILLIC_CRNN_512,
  RECOGNIZER_CYRILLIC_CRNN_64,
  'ady'
);

export const OCR_AFRIKAANS = createOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_256,
  RECOGNIZER_LATIN_CRNN_128,
  'af'
);
export const VERTICAL_OCR_AFRIKAANS = createVerticalOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_64,
  'af'
);

export const OCR_AVAR = createOCRObject(
  RECOGNIZER_CYRILLIC_CRNN_512,
  RECOGNIZER_CYRILLIC_CRNN_256,
  RECOGNIZER_CYRILLIC_CRNN_128,
  'ava'
);
export const VERTICAL_OCR_AVAR = createVerticalOCRObject(
  RECOGNIZER_CYRILLIC_CRNN_512,
  RECOGNIZER_CYRILLIC_CRNN_64,
  'ava'
);

export const OCR_AZERBAIJANI = createOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_256,
  RECOGNIZER_LATIN_CRNN_128,
  'az'
);
export const VERTICAL_OCR_AZERBAIJANI = createVerticalOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_64,
  'az'
);

export const OCR_BELARUSIAN = createOCRObject(
  RECOGNIZER_CYRILLIC_CRNN_512,
  RECOGNIZER_CYRILLIC_CRNN_256,
  RECOGNIZER_CYRILLIC_CRNN_128,
  'be'
);
export const VERTICAL_OCR_BELARUSIAN = createVerticalOCRObject(
  RECOGNIZER_CYRILLIC_CRNN_512,
  RECOGNIZER_CYRILLIC_CRNN_64,
  'be'
);

export const OCR_BULGARIAN = createOCRObject(
  RECOGNIZER_CYRILLIC_CRNN_512,
  RECOGNIZER_CYRILLIC_CRNN_256,
  RECOGNIZER_CYRILLIC_CRNN_128,
  'bg'
);
export const VERTICAL_OCR_BULGARIAN = createVerticalOCRObject(
  RECOGNIZER_CYRILLIC_CRNN_512,
  RECOGNIZER_CYRILLIC_CRNN_64,
  'bg'
);

export const OCR_BOSNIAN = createOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_256,
  RECOGNIZER_LATIN_CRNN_128,
  'bs'
);
export const VERTICAL_OCR_BOSNIAN = createVerticalOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_64,
  'bs'
);

export const OCR_SIMPLIFIED_CHINESE = createOCRObject(
  RECOGNIZER_ZH_SIM_CRNN_512,
  RECOGNIZER_ZH_SIM_CRNN_256,
  RECOGNIZER_ZH_SIM_CRNN_128,
  'chSim'
);
export const VERTICAL_OCR_SIMPLIFIED_CHINESE = createVerticalOCRObject(
  RECOGNIZER_ZH_SIM_CRNN_512,
  RECOGNIZER_ZH_SIM_CRNN_64,
  'chSim'
);

export const OCR_CHECHEN = createOCRObject(
  RECOGNIZER_CYRILLIC_CRNN_512,
  RECOGNIZER_CYRILLIC_CRNN_256,
  RECOGNIZER_CYRILLIC_CRNN_128,
  'che'
);
export const VERTICAL_OCR_CHECHEN = createVerticalOCRObject(
  RECOGNIZER_CYRILLIC_CRNN_512,
  RECOGNIZER_CYRILLIC_CRNN_64,
  'che'
);

export const OCR_CZECH = createOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_256,
  RECOGNIZER_LATIN_CRNN_128,
  'cs'
);
export const VERTICAL_OCR_CZECH = createVerticalOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_64,
  'cs'
);

export const OCR_WELSH = createOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_256,
  RECOGNIZER_LATIN_CRNN_128,
  'cy'
);
export const VERTICAL_OCR_WELSH = createVerticalOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_64,
  'cy'
);

export const OCR_DANISH = createOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_256,
  RECOGNIZER_LATIN_CRNN_128,
  'da'
);
export const VERTICAL_OCR_DANISH = createVerticalOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_64,
  'da'
);

export const OCR_DARGWA = createOCRObject(
  RECOGNIZER_CYRILLIC_CRNN_512,
  RECOGNIZER_CYRILLIC_CRNN_256,
  RECOGNIZER_CYRILLIC_CRNN_128,
  'dar'
);
export const VERTICAL_OCR_DARGWA = createVerticalOCRObject(
  RECOGNIZER_CYRILLIC_CRNN_512,
  RECOGNIZER_CYRILLIC_CRNN_64,
  'dar'
);

export const OCR_GERMAN = createOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_256,
  RECOGNIZER_LATIN_CRNN_128,
  'de'
);
export const VERTICAL_OCR_GERMAN = createVerticalOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_64,
  'de'
);

export const OCR_ENGLISH = createOCRObject(
  RECOGNIZER_ENGLISH_CRNN_512,
  RECOGNIZER_ENGLISH_CRNN_256,
  RECOGNIZER_ENGLISH_CRNN_128,
  'en'
);
export const VERTICAL_OCR_ENGLISH = createVerticalOCRObject(
  RECOGNIZER_ENGLISH_CRNN_512,
  RECOGNIZER_ENGLISH_CRNN_64,
  'en'
);

export const OCR_SPANISH = createOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_256,
  RECOGNIZER_LATIN_CRNN_128,
  'es'
);
export const VERTICAL_OCR_SPANISH = createVerticalOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_64,
  'es'
);

export const OCR_ESTONIAN = createOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_256,
  RECOGNIZER_LATIN_CRNN_128,
  'et'
);
export const VERTICAL_OCR_ESTONIAN = createVerticalOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_64,
  'et'
);

export const OCR_FRENCH = createOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_256,
  RECOGNIZER_LATIN_CRNN_128,
  'fr'
);
export const VERTICAL_OCR_FRENCH = createVerticalOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_64,
  'fr'
);

export const OCR_IRISH = createOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_256,
  RECOGNIZER_LATIN_CRNN_128,
  'ga'
);
export const VERTICAL_OCR_IRISH = createVerticalOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_64,
  'ga'
);

export const OCR_CROATIAN = createOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_256,
  RECOGNIZER_LATIN_CRNN_128,
  'hr'
);
export const VERTICAL_OCR_CROATIAN = createVerticalOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_64,
  'hr'
);

export const OCR_HUNGARIAN = createOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_256,
  RECOGNIZER_LATIN_CRNN_128,
  'hu'
);
export const VERTICAL_OCR_HUNGARIAN = createVerticalOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_64,
  'hu'
);

export const OCR_INDONESIAN = createOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_256,
  RECOGNIZER_LATIN_CRNN_128,
  'id'
);
export const VERTICAL_OCR_INDONESIAN = createVerticalOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_64,
  'id'
);

export const OCR_INGUSH = createOCRObject(
  RECOGNIZER_CYRILLIC_CRNN_512,
  RECOGNIZER_CYRILLIC_CRNN_256,
  RECOGNIZER_CYRILLIC_CRNN_128,
  'inh'
);
export const VERTICAL_OCR_INGUSH = createVerticalOCRObject(
  RECOGNIZER_CYRILLIC_CRNN_512,
  RECOGNIZER_CYRILLIC_CRNN_64,
  'inh'
);

export const OCR_ICELANDIC = createOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_256,
  RECOGNIZER_LATIN_CRNN_128,
  'ic'
);
export const VERTICAL_OCR_ICELANDIC = createVerticalOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_64,
  'ic'
);

export const OCR_ITALIAN = createOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_256,
  RECOGNIZER_LATIN_CRNN_128,
  'it'
);
export const VERTICAL_OCR_ITALIAN = createVerticalOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_64,
  'it'
);

export const OCR_JAPANESE = createOCRObject(
  RECOGNIZER_JAPANESE_CRNN_512,
  RECOGNIZER_JAPANESE_CRNN_256,
  RECOGNIZER_JAPANESE_CRNN_128,
  'ja'
);
export const VERTICAL_OCR_JAPANESE = createVerticalOCRObject(
  RECOGNIZER_JAPANESE_CRNN_512,
  RECOGNIZER_JAPANESE_CRNN_64,
  'ja'
);

export const OCR_KARBADIAN = createOCRObject(
  RECOGNIZER_CYRILLIC_CRNN_512,
  RECOGNIZER_CYRILLIC_CRNN_256,
  RECOGNIZER_CYRILLIC_CRNN_128,
  'kbd'
);
export const VERTICAL_OCR_KARBADIAN = createVerticalOCRObject(
  RECOGNIZER_CYRILLIC_CRNN_512,
  RECOGNIZER_CYRILLIC_CRNN_64,
  'kbd'
);

export const OCR_KANNADA = createOCRObject(
  RECOGNIZER_KANNADA_CRNN_512,
  RECOGNIZER_KANNADA_CRNN_256,
  RECOGNIZER_KANNADA_CRNN_128,
  'kn'
);
export const VERTICAL_OCR_KANNADA = createVerticalOCRObject(
  RECOGNIZER_KANNADA_CRNN_512,
  RECOGNIZER_KANNADA_CRNN_64,
  'kn'
);

export const OCR_KOREAN = createOCRObject(
  RECOGNIZER_KOREAN_CRNN_512,
  RECOGNIZER_KOREAN_CRNN_256,
  RECOGNIZER_KOREAN_CRNN_128,
  'ko'
);
export const VERTICAL_OCR_KOREAN = createVerticalOCRObject(
  RECOGNIZER_KOREAN_CRNN_512,
  RECOGNIZER_KOREAN_CRNN_64,
  'ko'
);

export const OCR_KURDISH = createOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_256,
  RECOGNIZER_LATIN_CRNN_128,
  'ku'
);
export const VERTICAL_OCR_KURDISH = createVerticalOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_64,
  'ku'
);

export const OCR_LATIN = createOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_256,
  RECOGNIZER_LATIN_CRNN_128,
  'la'
);
export const VERTICAL_OCR_LATIN = createVerticalOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_64,
  'la'
);

export const OCR_LAK = createOCRObject(
  RECOGNIZER_CYRILLIC_CRNN_512,
  RECOGNIZER_CYRILLIC_CRNN_256,
  RECOGNIZER_CYRILLIC_CRNN_128,
  'lbe'
);
export const VERTICAL_OCR_LAK = createVerticalOCRObject(
  RECOGNIZER_CYRILLIC_CRNN_512,
  RECOGNIZER_CYRILLIC_CRNN_64,
  'lbe'
);

export const OCR_LEZGHIAN = createOCRObject(
  RECOGNIZER_CYRILLIC_CRNN_512,
  RECOGNIZER_CYRILLIC_CRNN_256,
  RECOGNIZER_CYRILLIC_CRNN_128,
  'lez'
);
export const VERTICAL_OCR_LEZGHIAN = createVerticalOCRObject(
  RECOGNIZER_CYRILLIC_CRNN_512,
  RECOGNIZER_CYRILLIC_CRNN_64,
  'lez'
);

export const OCR_LITHUANIAN = createOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_256,
  RECOGNIZER_LATIN_CRNN_128,
  'lt'
);
export const VERTICAL_OCR_LITHUANIAN = createVerticalOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_64,
  'lt'
);

export const OCR_LATVIAN = createOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_256,
  RECOGNIZER_LATIN_CRNN_128,
  'lv'
);
export const VERTICAL_OCR_LATVIAN = createVerticalOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_64,
  'lv'
);

export const OCR_MAORI = createOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_256,
  RECOGNIZER_LATIN_CRNN_128,
  'mi'
);
export const VERTICAL_OCR_MAORI = createVerticalOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_64,
  'mi'
);

export const OCR_MONGOLIAN = createOCRObject(
  RECOGNIZER_CYRILLIC_CRNN_512,
  RECOGNIZER_CYRILLIC_CRNN_256,
  RECOGNIZER_CYRILLIC_CRNN_128,
  'mn'
);
export const VERTICAL_OCR_MONGOLIAN = createVerticalOCRObject(
  RECOGNIZER_CYRILLIC_CRNN_512,
  RECOGNIZER_CYRILLIC_CRNN_64,
  'mn'
);

export const OCR_MALAY = createOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_256,
  RECOGNIZER_LATIN_CRNN_128,
  'ms'
);
export const VERTICAL_OCR_MALAY = createVerticalOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_64,
  'ms'
);

export const OCR_MALTESE = createOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_256,
  RECOGNIZER_LATIN_CRNN_128,
  'mt'
);
export const VERTICAL_OCR_MALTESE = createVerticalOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_64,
  'mt'
);

export const OCR_DUTCH = createOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_256,
  RECOGNIZER_LATIN_CRNN_128,
  'nl'
);
export const VERTICAL_OCR_DUTCH = createVerticalOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_64,
  'nl'
);

export const OCR_NORWEGIAN = createOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_256,
  RECOGNIZER_LATIN_CRNN_128,
  'no'
);
export const VERTICAL_OCR_NORWEGIAN = createVerticalOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_64,
  'no'
);

export const OCR_OCCITAN = createOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_256,
  RECOGNIZER_LATIN_CRNN_128,
  'oc'
);
export const VERTICAL_OCR_OCCITAN = createVerticalOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_64,
  'oc'
);

export const OCR_PALI = createOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_256,
  RECOGNIZER_LATIN_CRNN_128,
  'pi'
);
export const VERTICAL_OCR_PALI = createVerticalOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_64,
  'pi'
);

export const OCR_POLISH = createOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_256,
  RECOGNIZER_LATIN_CRNN_128,
  'pl'
);
export const VERTICAL_OCR_POLISH = createVerticalOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_64,
  'pl'
);

export const OCR_PORTUGUESE = createOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_256,
  RECOGNIZER_LATIN_CRNN_128,
  'pt'
);
export const VERTICAL_OCR_PORTUGUESE = createVerticalOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_64,
  'pt'
);

export const OCR_ROMANIAN = createOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_256,
  RECOGNIZER_LATIN_CRNN_128,
  'ro'
);
export const VERTICAL_OCR_ROMANIAN = createVerticalOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_64,
  'ro'
);

export const OCR_RUSSIAN = createOCRObject(
  RECOGNIZER_CYRILLIC_CRNN_512,
  RECOGNIZER_CYRILLIC_CRNN_256,
  RECOGNIZER_CYRILLIC_CRNN_128,
  'ru'
);
export const VERTICAL_OCR_RUSSIAN = createVerticalOCRObject(
  RECOGNIZER_CYRILLIC_CRNN_512,
  RECOGNIZER_CYRILLIC_CRNN_64,
  'ru'
);

export const OCR_SERBIAN_CYRILLIC = createOCRObject(
  RECOGNIZER_CYRILLIC_CRNN_512,
  RECOGNIZER_CYRILLIC_CRNN_256,
  RECOGNIZER_CYRILLIC_CRNN_128,
  'rsCyrillic'
);
export const VERTICAL_OCR_SERBIAN_CYRILLIC = createVerticalOCRObject(
  RECOGNIZER_CYRILLIC_CRNN_512,
  RECOGNIZER_CYRILLIC_CRNN_64,
  'rsCyrillic'
);

export const OCR_SERBIAN_LATIN = createOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_256,
  RECOGNIZER_LATIN_CRNN_128,
  'rsLatin'
);
export const VERTICAL_OCR_SERBIAN_LATIN = createVerticalOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_64,
  'rsLatin'
);

export const OCR_SLOVAK = createOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_256,
  RECOGNIZER_LATIN_CRNN_128,
  'sk'
);
export const VERTICAL_OCR_SLOVAK = createVerticalOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_64,
  'sk'
);

export const OCR_SLOVENIAN = createOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_256,
  RECOGNIZER_LATIN_CRNN_128,
  'sl'
);
export const VERTICAL_OCR_SLOVENIAN = createVerticalOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_64,
  'sl'
);

export const OCR_ALBANIAN = createOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_256,
  RECOGNIZER_LATIN_CRNN_128,
  'sq'
);
export const VERTICAL_OCR_ALBANIAN = createVerticalOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_64,
  'sq'
);

export const OCR_SWEDISH = createOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_256,
  RECOGNIZER_LATIN_CRNN_128,
  'sv'
);
export const VERTICAL_OCR_SWEDISH = createVerticalOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_64,
  'sv'
);

export const OCR_SWAHILI = createOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_256,
  RECOGNIZER_LATIN_CRNN_128,
  'sw'
);
export const VERTICAL_OCR_SWAHILI = createVerticalOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_64,
  'sw'
);

export const OCR_TABASSARAN = createOCRObject(
  RECOGNIZER_CYRILLIC_CRNN_512,
  RECOGNIZER_CYRILLIC_CRNN_256,
  RECOGNIZER_CYRILLIC_CRNN_128,
  'tab'
);
export const VERTICAL_OCR_TABASSARAN = createVerticalOCRObject(
  RECOGNIZER_CYRILLIC_CRNN_512,
  RECOGNIZER_CYRILLIC_CRNN_64,
  'tab'
);

export const OCR_TELUGU = createOCRObject(
  RECOGNIZER_TELUGU_CRNN_512,
  RECOGNIZER_TELUGU_CRNN_256,
  RECOGNIZER_TELUGU_CRNN_128,
  'te'
);
export const VERTICAL_OCR_TELUGU = createVerticalOCRObject(
  RECOGNIZER_TELUGU_CRNN_512,
  RECOGNIZER_TELUGU_CRNN_64,
  'te'
);

export const OCR_TAJIK = createOCRObject(
  RECOGNIZER_CYRILLIC_CRNN_512,
  RECOGNIZER_CYRILLIC_CRNN_256,
  RECOGNIZER_CYRILLIC_CRNN_128,
  'tjk'
);
export const VERTICAL_OCR_TAJIK = createVerticalOCRObject(
  RECOGNIZER_CYRILLIC_CRNN_512,
  RECOGNIZER_CYRILLIC_CRNN_64,
  'tjk'
);

export const OCR_TAGALOG = createOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_256,
  RECOGNIZER_LATIN_CRNN_128,
  'tl'
);
export const VERTICAL_OCR_TAGALOG = createVerticalOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_64,
  'tl'
);

export const OCR_TURKISH = createOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_256,
  RECOGNIZER_LATIN_CRNN_128,
  'tr'
);
export const VERTICAL_OCR_TURKISH = createVerticalOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_64,
  'tr'
);

export const OCR_UKRAINIAN = createOCRObject(
  RECOGNIZER_CYRILLIC_CRNN_512,
  RECOGNIZER_CYRILLIC_CRNN_256,
  RECOGNIZER_CYRILLIC_CRNN_128,
  'uk'
);
export const VERTICAL_OCR_UKRAINIAN = createVerticalOCRObject(
  RECOGNIZER_CYRILLIC_CRNN_512,
  RECOGNIZER_CYRILLIC_CRNN_64,
  'uk'
);

export const OCR_UZBEK = createOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_256,
  RECOGNIZER_LATIN_CRNN_128,
  'uz'
);
export const VERTICAL_OCR_UZBEK = createVerticalOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_64,
  'uz'
);

export const OCR_VIETNAMESE = createOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_256,
  RECOGNIZER_LATIN_CRNN_128,
  'vi'
);
export const VERTICAL_OCR_VIETNAMESE = createVerticalOCRObject(
  RECOGNIZER_LATIN_CRNN_512,
  RECOGNIZER_LATIN_CRNN_64,
  'vi'
);
